package com;

import com.mapper.UserMapper;
import com.pojo.User;
import com.utils.MyBatisUtils;
import org.junit.Test;

import java.util.List;

/**
 * @author YDW
 * projectName:project2202_3
 * time:2022/4/28 15:57
 * description:
 */
public class testResultMap {
    @Test
    public void test(){
        UserMapper mapper= MyBatisUtils.getMapper(UserMapper.class);
        System.out.println("----------第一次-----------");
        List<User> users = mapper.queryAll();
        for (User user : users) {
            System.out.println(user);
        }
        System.out.println("----------第二次-----------");
        UserMapper mapper1= MyBatisUtils.getMapper(UserMapper.class);
        List<User> users1 = mapper1.queryAll();
        for (User user : users1) {
            System.out.println(user);
        }
    }
}
